﻿// EXP0509.cpp : 编写一段程序，使用一系列if语句统计从cin读入的文本中有多少元音字母。
//

#include <iostream>
#include <vector>
#include <string>
using namespace std;

int main()
{
	cout << "输入一段字符串" << endl;
	vector<char> vowels = { 'a','e','i','o','u' };
	vector<int> vowelNum(5, 0);
	char ch;
	while (cin >> ch)
	{
		for (int i = 0; i < 5; ++i)
		{
			if (ch == vowels[i]) ++vowelNum[i];			
		}

	}
	copy(vowels.begin(), vowels.end(), ostream_iterator<char>(cout, " "));
	cout << endl;
	copy(vowelNum.begin(), vowelNum.end(), ostream_iterator<int>(cout, " "));
	cout << endl;



	/*unsigned aCnt = 0, eCnt = 0, iCnt = 0, oCnt = 0, uCnt = 0;
	char ch;
	while (cin >> ch)
	{
		if (ch == 'a') ++aCnt;
		else if (ch == 'e') ++eCnt;
		else if (ch == 'i') ++iCnt;
		else if (ch == 'o') ++oCnt;
		else if (ch == 'u') ++uCnt;
	}
	cout << "Number of vowel a: \t" << aCnt << '\n'
		<< "Number of vowel e: \t" << eCnt << '\n'
		<< "Number of vowel i: \t" << iCnt << '\n'
		<< "Number of vowel o: \t" << oCnt << '\n'
		<< "Number of vowel u: \t" << uCnt << endl;*/


	return 0;

}


